﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace OffGeriatria
{
    public partial class Menu : Form
    {
        public Menu()
        {
            InitializeComponent();
        }

        private void Menu_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'catgeriatriaDataSet.dbo_medicoGeriatra' table. You can move, or remove it, as needed.
            this.dbo_medicoGeriatraTableAdapter.Fill(this.catgeriatriaDataSet.dbo_medicoGeriatra);
            // TODO: This line of code loads data into the 'catgeriatriaDataSet.dbo_participantes' table. You can move, or remove it, as needed.
            this.dbo_participantesTableAdapter.Fill(this.catgeriatriaDataSet.dbo_participantes);

        }

        private void dvParticipantes_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == -1)
                MessageBox.Show("Error -- Falta mensaje...");
            else if (e.ColumnIndex == 0)
            {
                int participanteid = Convert.ToInt32(gvParticipantes.Rows[e.RowIndex].Cells[1].Value);
                new frmdinamiza(participanteid).Show();
            }
        }

        private void btnNuevoParticipante_Click(object sender, EventArgs e)
        {
            new frmdinamiza().Show();
        }

        private void btnnuevamedicion_Click(object sender, EventArgs e)
        {
            new frmgeriatra().Show();
        }

    }
}
